package com.aircraft.config;

import com.aircraft.config.aspect.AccessLimitInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;


/**
 * 访问拦截器配置
 */
@Configuration
public class InterceptorConfig  implements WebMvcConfigurer {
 
    @Resource
    private AccessLimitInterceptor accessLimitInterceptor;
 
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(accessLimitInterceptor)
                .addPathPatterns("/**").excludePathPatterns("");
    }
}